<template>
  <!-- 检查申请单 -->
  <el-dialog
    v-model="dialogVisible"
    title="检查申请单"
    :width="800"
    :before-close="handleClose"
  >
    <user />
    <div class="mt12">
      <el-tabs type="border-card" v-model="activeName">
        <el-tab-pane
          :label="item.label"
          v-for="(item, index) in tabMap"
          :name="item.value"
          :key="index"
        >
          <keep-alive>
            <div>
              <span>定位：</span>
              <el-input v-model="value" placeholder=""></el-input>
              <div class="item">
                <el-checkbox-group v-model="checkList[activeName]">
                  <el-checkbox label="Option A" value="Value A" />
                </el-checkbox-group>
              </div>
            </div>
          </keep-alive>
        </el-tab-pane>
      </el-tabs>
    </div>
  </el-dialog>
</template>
<script setup lang="ts">
import { useDialog } from "@common/src/hooks/dialog.ts";
import user from "./components/user.vue";
const activeName = ref("0");
const tabMap = [
  {
    label: "临检组",
    value: "0",
  },
  {
    label: "生化组",
    value: "1",
  },
  {
    label: "微生物组",
    value: "2",
  },

  {
    label: "免疫学组",
    value: "3",
  },
  {
    label: "其他组",
    value: "4",
  },
];
const checkList = reactive({
  0: [],
  1: [],
  2: [],
  3: [],
  4: [],
});

const props = withDefaults(
  defineProps<{
    modelValue: boolean;
    params: Object;
  }>(),
  {
    modelValue: false,
    params: () => {},
  }
);

const formInline = reactive({
  user: "",
});

const emit = defineEmits(["update:modelValue"]);
const { handleClose, dialogVisible } = useDialog(props, emit);
</script>

<style lang="scss" scoped>
.cu-p {
  cursor: pointer;
}
</style>
